public class NeighborhoodSearch {
    private GreedyAlgorithm greedy;
    private int[] weight;
    public void filling(int i) {
        greedy.Filling(i);
    }
    public int[][] getisAdd(){
        return greedy.getisAdd();
    }
    public NeighborhoodSearch() {
        greedy = new GreedyAlgorithm();
        System.out.println("Greedy Search");
        greedy.add();
        weight = greedy.getWeightArr();
        greedy.removeAdded();
    }
    public NeighborhoodSearch(GreedyAlgorithm greedy) {
        this.greedy = new GreedyAlgorithm(greedy.getN(),greedy.getM(),greedy.getItem_weight(),greedy.getItem_values(),greedy.getisAdd(),greedy.getWeight(),greedy.getWeighted(),greedy.getBag_value());
        this.weight = this.greedy.getWeightArr();
    }
    public GreedyAlgorithm getGreedy() {
        return this.greedy;
    }
    public void circle() {
        for(int i = 0; i < weight.length; i++) {
            filling(i);
        }
    }
    public int[] getWeight() {
        return weight;
    }
    public int getTotalValue() {
        int value = 0;
        value = greedy.getTotalValue();
        return value;
    }
    public void Output() {
        greedy.Output();
    }
    public static void main(String[] args) {
        NeighborhoodSearch search = new NeighborhoodSearch();
        search.circle();
        System.out.println("Neighborhood Search");
        search.Output();
    }
}